class Geoda::Vertex
  attr_accessor :vector, :texture, :normal

  alias :v :vector
  alias :n :normal
  alias :t :texture

  def initialize(*args)
    if args.size >= 3
      @vector  = Geoda::Vector.elements(args[0..2])
      case args.size
        when 5
          @texture = Geoda::Vector.elements(args[3..4])
        when 6
          @normal  = Geoda::Vector.elements(args[3..5])
        when 8
          @normal  = Geoda::Vector.elements(args[3..5])
          @texture = Geoda::Vector.elements(args[6..8])
      end
    end
    @vector  ||= Geoda::Vector[0.0,0.0,0.0]
    @normal  ||= Geoda::Vector[0.0,0.0,0.0]
    @texture ||= Geoda::Vector[0.0,0.0]
  end

end